Longest Previous Factor in linear time and applications ✩
نویسندگان
چکیده
We give two optimal linear-time algorithms for computing the Longest Previous Factor (LPF) array corresponding to a string w. For any position i in w, LPF[i] gives the length of the longest factor of w starting at position i that occurs previously in w. Several properties and applications of LPF are investigated. They include computing the Lempel–Ziv factorization of a string and detecting all repetitions (runs) in a string in linear time independently of the integer alphabet size. © 2007 Elsevier B.V. All rights reserved.
منابع مشابه
Computing Longest Previous Factor in linear time and applications
We give two optimal linear-time algorithms for computing the Longest Previous Factor (LPF) array corresponding to a string w. For any position i in w, LPF[i] gives the length of the longest factor of w starting at position i that occurs previously in w. Several properties and applications of LPF are investigated. They include computing the Lempel-Ziv factorization of a string and detecting all ...
متن کاملEfficient Algorithms for Two Extensions of LPF Table: The Power of Suffix Arrays
Suffix arrays provide a powerful data structure to solve several questions related to the structure of all the factors of a string. We show how they can be used to compute efficiently two new tables storing different types of previous factors (past segments) of a string. The concept of a longest previous factor is inherent to Ziv-Lempel factorisation of strings in text compression as well as in...
متن کاملEfficient Computing of Longest Previous Reverse Factors
We study the problem of finding the longest previous reverse factor occurring at each position of a string. This is a generalisation of a notion used for the optimal detection of various types of palindromes in a string. We describe two algorithms for computing the LPrF table of a string, one from its Suffix Tree and the second from its Suffix Automaton respectively. These algorithms run in lin...
متن کاملLongest Path in Networks of Queues in the Steady-State
Due to the importance of longest path analysis in networks of queues, we develop an analytical method for computing the steady-state distribution function of longest path in acyclic networks of queues. We assume the network consists of a number of queuing systems and each one has either one or infinite servers. The distribution function of service time is assumed to be exponential or Erlang. Fu...
متن کاملSuffix Trees and Suffix Arrays
Iowa State University 1.1 Basic Definitions and Properties . . . . . . . . . . . . . . . . . . . . 1-1 1.2 Linear Time Construction Algorithms . . . . . . . . . . . . . 1-4 Suffix Trees vs. Suffix Arrays • Linear Time Construction of Suffix Trees • Linear Time Construction of Suffix Arrays • Space Issues 1.3 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
متن کامل